

package com.maoshi.shop.common.exception;

import com.maoshi.shop.common.enums.MaoshiHttpStatus;
import lombok.Getter;
import org.springframework.http.HttpStatus;

@Getter
public class MaoshiShopBindException extends RuntimeException{

	/**
	 *
	 */
	private static final long serialVersionUID = -4137688758944857209L;

	/**
	 * http状态码
	 */
	private Integer httpStatusCode;

	private Object object;

	/**
	 * @param httpStatus http状态码
	 */
	public MaoshiShopBindException(MaoshiHttpStatus httpStatus) {
		super(httpStatus.getMsg());
		this.httpStatusCode = httpStatus.value();
	}

	/**
	 * @param httpStatus http状态码
	 */
	public MaoshiShopBindException(MaoshiHttpStatus httpStatus, String msg) {
		super(msg);
		this.httpStatusCode = httpStatus.value();
	}


	public MaoshiShopBindException(String msg) {
		super(msg);
		this.httpStatusCode = HttpStatus.BAD_REQUEST.value();
	}

	public MaoshiShopBindException(String msg, Object object) {
		super(msg);
		this.httpStatusCode = HttpStatus.BAD_REQUEST.value();
		this.object = object;
	}

}
